package kr.hkit.powerjava.s;

class BankAccount {
	int balance;

	void deposit(int amount) {
		balance += amount;
	}

	void withdraw(int amount) {
		balance -= amount;
		if (balance < 0) {
			System.out.println("예금값이 부족합니다.");
		}
	}

	int getBalance() {
		double eja = (balance * 0.075) + balance;
		if (balance < 0) {
			System.out.println("예금값이 부족합니다.");
		} else {

			System.out.println(balance + "원");
			System.out.println("예상이자 포함 값 : " + (int) eja + "원");
		}
		return balance;
	}

}

public class BankAccountTest {
	public static void main(String[] args) {
		BankAccount b = new BankAccount();

		b.deposit(60);
		b.withdraw(40);
		b.getBalance();

	}
}
